package com.chuan.jms.producer;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * Created by zhaowenchuan on 2018/10/19.
 */
public class $Producer {

    public static void main(String[] args) {
        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("productor.xml");
        context.getBean("productorServiceImpl");
        ProductorServiceImpl productorServiceImpl = context.getBean("productorServiceImpl", ProductorServiceImpl.class);
        for (int i = 0; i < 100; i++) {
            productorServiceImpl.sendMessage("TEST：" + i);
        }
        //context.close(); //清除容器
    }
}
